﻿using System;
using System.Text.RegularExpressions;

namespace leetcode_1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(",");
            int[] li = new int[s.Length];
            for(int i = 0; i < s.Length; i++)
            {
                li[i] = int.Parse(s[i]);
            }
            int target = int.Parse(Console.ReadLine());

            int[] result = new Solution().TwoSum_TwiceHash(li, target);
            Console.WriteLine(string.Format($"TwoSum_DoubleHash: [{result[0]},{result[1]}]"));

            int[] result2 = new Solution().TwoSum_OnceHash(li, target);
            Console.WriteLine(string.Format($"TwoSum_OnceHash: [{result2[0]},{result2[1]}]"));
        }
    }
}
